package com.my.mall.client.alehouse.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.my.mall.client.alehouse.dao.AlehouseClientDao;
import com.my.mall.client.alehouse.vo.AlehouseClientVo;

@Service
public class AlehouseClientService {

	@Autowired
	AlehouseClientDao alehouseClientDao;

	public int selectAlehouseInfoCount(int categoryId) {
		return alehouseClientDao.selectAlehouseInfoCount(categoryId);
	}

	public List<AlehouseClientVo> selectAlehouseInfoList(int categoryId, int pageNumber, int length) {
		return alehouseClientDao.selectAlehouseInfoList(categoryId, (pageNumber - 1) * length, (pageNumber * length));
	}
}
